/* ==========================================================================
   Общие стили и стили для container
   ========================================================================== */

.container.ptop {
    padding-top: 1rem !important;
    padding-bottom: 0 !important;
    min-height: 75vh;
}

/* ==========================================================================
   Стили для блока "Условия" (и аналогичных с icon-box)
   ========================================================================== */

.service .icon-box {
    padding: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    overflow: hidden;
    margin: 0 0.5rem 2.5rem 0.5rem;
    background: #fff;
    box-shadow: 0 0.125rem 1.8125rem 0 rgba(68, 88, 144, 0.2);
    transition: all 0.3s ease-in-out;
    border-radius: 0.25rem;
}

.service .icon-box:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.25rem 2.5rem 0 rgba(68, 88, 144, 0.3);
}

.service .icon {
    font-size: 2.5rem;
    line-height: 1;
    color: #132d66; /* Ваш синий для иконок */
    display: block;
    flex-shrink: 0;
    width: auto;
    height: auto;
}

.service .text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.service .title {
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
    color: #2E3137;
    margin-bottom: 0.5rem;
}

.service .description {
    font-size: 0.875rem;
    color: #6C7A89;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==========================================================================
   Стили для блока "Преимущества программы"
   ========================================================================== */

.service-advantages { /* Новый класс-обертка */
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center; /* Центрируем содержимое вертикально */
}

.service .icon-box.advantages {
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем содержимое вертикально */
    height: 100%; /* Добавляем высоту для равномерного распределения */
}

.service .title1 {
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 600;
    color: #2E3137;
    margin-bottom: 0.25rem;
}

.service .description1 {
    font-size: 0.875rem;
    color: #6c7a89;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==========================================================================
   Стили для ссылок внутри блоков .service
   ========================================================================== */

.service .title a {
    color: #132d66; /* Ваш синий для ссылок */
    text-decoration: none;
    transition: color 0.3s ease;
}

.service .title a:hover {
    color: #132d66; /* Возвращаем синий цвет */
}

.service .icon-box:hover .title a {
    color: #132d66; /* Возвращаем синий цвет */
}

/* ==========================================================================
   Стили для блока "Участники программы" (логотипы)
   ========================================================================== */

.client-logo img {
    width: auto;
    height: 80px;
    max-width: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: grayscale(80%);
    opacity: 0.8;
    transition: all 0.3s ease;
    border-radius: 0.25rem;
}

.client-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================================================
   Стили для блока "Призыв к действию" (Call To Action)
   ========================================================================== */

.c2a6 h1,
.c2a6 h2,
.c2a6 h3,
.c2a6 h4,
.c2a6 h5,
.c2a6 h6 {
    font-family: "Montserrat", sans-serif;
    color: #2E3137;
}

h3 {
    font-size: 1.25rem !important;
}

.c2a6 h3 {
    text-transform: uppercase;
    color: #132d66; /* Ваш синий */
    font-weight: 700;
}

.c2a6 .btn-primary {
    background: #132d66; /* Ваш синий */
    border: 1px solid #132d66;
    color: #fff;
    transition: all 0.3s ease;
    border-radius: 0.25rem;
}

.c2a6 .btn-primary:hover {
    background: #102758;
    border-color: #102758;
}

.c2a6 .subtitle {
    color: #6C7A89;
    line-height: 1.6;
}

.c2a6 .btn-md {
    padding: 1rem 2.8125rem;
    font-size: 1rem;
}

.calltoaction {
    padding: 1.875rem;
    margin: 0 0.5rem 2.5rem 0.5rem;
    background: #F9F9F9;
    box-shadow: 0 0.125rem 1.8125rem 0 rgba(68, 88, 144, 0.2);
    transition: all 0.3s ease-in-out;
    border-radius: 0.5rem;
}

.calltoaction:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.25rem 2.5rem 0 rgba(68, 88, 144, 0.3);
}

/* ==========================================================================
   Стили для навигации табов
   ========================================================================== */

.nav-pills .nav-link {
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    color: #2E3137;
    background-color: #fff;
    padding: 0.625rem 1.875rem;
    font-size: 14.4px;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    border: none;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: #132d66 !important; /* Ваш синий для активной вкладки */
    border-color: #132d66;
}

.nav-pills .nav-link:hover {
    background-color: #f2f2f2;
}

/* ==========================================================================
   Стили для блока документов
   ========================================================================== */

.docs {
    font-size: 0.875rem;
    color: #2e3137;
    line-height: 1.5;
    margin-bottom: 0.625rem;
}

.docs a {
    font-size: 0.875rem;
    color: #132d66; /* Ваш синий для ссылок */
    line-height: 1.5;
    margin-bottom: 0.625rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.docs a:hover {
    color: #132d66; /* Возвращаем синий цвет */
}

.ist a[href$=".doc"],
.ist a[href$=".docx"],
.ist a[href$=".rtf"] {
    background: url("/upload/iconsblack/word.png") left center no-repeat;
    background-size: 1.25rem;
    padding-left: 2rem;
}

.ist a[href$=".pdf"] {
    background: url("/upload/iconsblack/pdf-icon.png") left center no-repeat;
    background-size: 1.25rem;
    padding-left: 2rem;
}

.ist a[href$=".xls"],
.ist a[href$=".xlsx"] {
    background: url("/upload/iconsblack/excel.png") left center no-repeat;
    background-size: 1.25rem;
    padding-left: 2rem;
}

.ist a[href$=".ppt"],
.ist a[href$=".pptx"] {
    background: url("/upload/iconsblack/ppt.png") left center no-repeat;
    background-size: 1.25rem;
    padding-left: 2rem;
}

/* ==========================================================================
   Media Queries для адаптивного дизайна
   ========================================================================== */

@media (max-width: 767.98px) {
    .service .icon {
        font-size: 2rem;
    }

    .service .title,
    .service .description {
        margin-left: 0;
    }

    .nav-pills {
        display: flex;
        flex-direction: column;
    }

    .nav-pills .nav-link {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    h3 {
        font-size: 1rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .nav-pills .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}


/* ==========================================================================
   Стили для калькулятора
   ========================================================================== */


.calculator-section {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin: 0 1rem 2rem 1rem;

    flex-wrap: wrap;
    box-sizing: border-box;
}

.calculator-column {
    width: 48%;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 1.8125rem 0 rgba(68, 88, 144, 0.2);
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.calculator-column:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.25rem 2.5rem 0 rgba(68, 88, 144, 0.3);
}

.calculator {
    padding: 2rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.calculator h3 {
    text-align: center;
    color: #132d66;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.calculator-form-group {
    margin-bottom: 1.5rem;
}

.calculator-form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: #555;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
}

.calculator-form-group label span {
    font-size: 0.9rem;
    color: #888;
}

.calculator-slider-container {
    position: relative;
    height: 1rem;
    margin-bottom: 0.5rem;
}

.calculator-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 0.5rem;
    background: linear-gradient(to right, #132d66 0%, #132d66 var(--slider-percent), #ddd var(--slider-percent), #ddd 100%);
    border-radius: 0.25rem;
    outline: none;
    -webkit-transition: background 0.2s ease-in-out;
    transition: background 0.2s ease-in-out;
}

.calculator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: #fff;
    border: 2px solid #132d66;
    border-radius: 50%;
    cursor: pointer;
    -webkit-transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.calculator-slider::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: #fff;
    border: 2px solid #132d66;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.calculator-slider::-webkit-slider-thumb:hover {
    background: #fafafa;
    transform: scale(1.1);
}

.calculator-slider::-moz-range-thumb:hover {
    background: #fafafa;
    transform: scale(1.1);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #132d66, #4a90e2);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    margin-top: 1.5rem;
}

.btn-primary:hover {
    background: linear-gradient(to right, #132d66, #1e88e5);

    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.calculator-results {
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    text-align: left;
    position: relative;
    box-shadow: 0 0.125rem 1.8125rem 0 rgba(68, 88, 144, 0.2);
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.calculator-results:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.25rem 2.5rem 0 rgba(68, 88, 144, 0.3);
}

.calculator-results h3 {
    font-size: 1.5rem;
    color: #132d66;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    display: block;
    width: 100%;
}

.calculator-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
}

.calculator-result-item:last-child {
    border-bottom: none;
}

.calculator-result-label {
    font-size: 0.875rem;
    color: #555;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
}

.calculator-result-value {
    font-size: 1.25rem;
    color: #132d66;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
    text-align: right;
}

.calculator-results .disclaimer {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-top: auto;
}

.calculator-results .disclaimer sup {
    color: red;
}

@media (max-width: 768px) {
    .calculator-section {
        flex-direction: column;
    }

    .calculator-column {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .calculator h3 {
        font-size: 1.25rem;
    }

    .calculator-results h3 {
        font-size: 1.25rem;
    }
}

.nav-pills .nav-item {
    flex: 1;
    text-align: center;
}
.nav-pills .nav-link {
    width: 100%;
    display: inline-block;
    background: none !important;
    border: none;
    border-radius: 0;
    font-weight: 500;
    font-size: 13px;
    color: #6c757d;
    padding: 10px 0;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-pills .nav-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: .5px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.nav-pills .nav-link.active {
    font-size: 12px;
    color: #132d66;
    font-weight: 500;
    background: none !important;
}

.nav-pills .nav-link.active::after {
    background-color: #132d66;
}

.nav-pills .nav-link:hover {
    color: #343a40;
}

.tab-content .tab-pane {
    padding-top: 30px;
}
.tab-pane {
    transition: opacity 0.3s ease-in-out;
}


@media (max-width: 768px) {
    .tabs-with-icons-top .nav-link {
        flex-direction: row !important;   /* горизонтально */
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        gap: 0.5rem;
    }

    .tabs-with-icons-top .nav-link i {
        margin-bottom: 0 !important;
        margin-right: 0.5rem;
    }
}

.tabs-floating-container {
    position: relative;
    z-index: 1;
    margin-top: -90px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.tabs-floating {
    background: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tabs-floating .nav-link {
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: 0.3s;
    color: #333;
}

.tabs-floating .nav-link.active {

    color: #132d66;
}
.tab-pane.docs .ist {
    text-align: center;
    margin: 1.5rem 0;
}

.tab-pane.docs .ist a {
    display: inline-block;
    font-size: 1rem;
    text-transform: uppercase;
    color: #132d66;
    font-weight: 600;
    margin: 0.5rem 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tab-pane.docs .ist a:hover {
    background-color: #e9ecef;
}

input.form-control-inline {
    margin-left: 5px;
}


/* ========================================================================== */
/* Стили для "Как подать заявку" */
/* ========================================================================== */

.steps-grid {
    display: grid;
    gap: 1.5rem;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Базовые стили для десктопа */
    max-width: 1000px;
    margin: 0 auto;
}

/* 4 блока: все в один ряд */
.steps-grid:has(.guarantee-step:nth-child(4)):not(:has(.guarantee-step:nth-child(5))) {
    grid-template-columns: repeat(4, 1fr);
}

/* 5 блоков: 3 сверху + 2 снизу, центрированные */
.steps-grid:has(.guarantee-step:nth-child(5)):not(:has(.guarantee-step:nth-child(6))) {
    grid-template-columns: repeat(3, 1fr); /* 3 колонки сверху */
    justify-items: center;
}

.steps-grid:has(.guarantee-step:nth-child(5)):not(:has(.guarantee-step:nth-child(6))) .guarantee-step:nth-child(4) {
    grid-column-start: 2; /* центрируем 4-й блок */
}

.steps-grid:has(.guarantee-step:nth-child(5)):not(:has(.guarantee-step:nth-child(6))) .guarantee-step:nth-child(5) {
    grid-column-start: 3; /* центрируем 5-й блок */
}

/* 6 блоков: 4 сверху + 2 снизу */
.steps-grid:has(.guarantee-step:nth-child(6)) {
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
}

.steps-grid:has(.guarantee-step:nth-child(6)) .guarantee-step:nth-child(5) {
    grid-column-start: 2;
}

.steps-grid:has(.guarantee-step:nth-child(6)) .guarantee-step:nth-child(6) {
    grid-column-start: 3;
}

/* Шаги алгоритма */
.guarantee-step {
    position: relative;
    width: 230px; /* Фиксированная ширина на десктопе */
    padding: 14px;
    border-radius: 0.75rem;
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.09);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guarantee-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #ffffff;
}

.guarantee-step img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.guarantee-step .step-desc {
    font-size: 14px;
    line-height: 1.3;
    margin-top: 0.25rem;
}

.step-number-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background-color: #4caf50;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}


/* --- Мобильные стили --- */

@media (max-width: 768px) {
    .steps-grid {
        /* Отменяем display: grid на мобилке */
        display: block;
    }

    .guarantee-step {
        /* Делаем блоки "резиновыми" и добавляем отступы */
        width: 100%;
        max-width: 320px;
        margin-bottom: 1rem;
    }
}


/* первый контейнер иконки */

.tabs-with-icons-top .nav-link {
    display: flex;
    flex-direction: column; /* Располагаем элементы вертикально */
    align-items: center;    /* Центрируем по горизонтали */
    text-align: center;     /* Центрируем текст */
    padding: 0.5rem 1rem;   /* Можно скорректировать отступы */
}

.tabs-with-icons-top .nav-link i {
    font-size: 20px;
    margin-right: 0 !important; /* Убираем отступ справа у иконки */
    margin-bottom: 0.25rem;    /* Добавляем отступ снизу, чтобы отделить иконку от текста */
}





.slider-limits {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 12px;
    margin-top: -5px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.business-type-btn {
    flex: 1;
    padding: 12px 8px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: center;
    color: #333;
}

.business-type-btn:hover {
    background: #e9ecef;
    color: #333;
}

.business-type-btn.active {
    background: #132d66;
    color: white;
    border-color: #132d66;
}

.calculator-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.calculator-column {
    flex: 1;
    min-width: 300px;
    max-width: 650px;
}

.results-column {
    flex: 1;
    min-width: 300px;
    max-width: 650px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.calculator {
    background: #fff;
    padding: 20px 30px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-block {
    background: #fff;
    padding: 20px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    height: 150px;
}


.result-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(68, 88, 144, 0.2);
}

.result-header {
    width: 100%;
    margin-bottom: 10px;
}

.result-header h4 {
    margin: 0;
    color: #6C7A89;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
}

.result-value {
    font-size: 25px;
    font-weight: 700;
    color: #132d66;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

.savings-value {
    color: #132d66;
}

.total-savings-value {
    color: #132d66;
}

.disclaimer-block {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
    padding: 0 10px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.calculator-slider {
    width: 100%;
    height: 8px;
    margin: 15px 0;
    -webkit-appearance: none;
    background: #e9ecef;
    border-radius: 4px;
    outline: none;
}

.slider-limits {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 12px;
    margin-top: -5px;
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 8px;
    }

    .business-type-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .calculator-section {
        gap: 20px;
        flex-direction: column;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-block.large {
        grid-column: auto !important;
    }

    .result-block {
        height: auto;
        padding: 15px;
    }
}
